package com.yunxin.yundubbo.util;

import com.yunxin.yundubbo.interfaces.DubboHandler;

import java.util.concurrent.ConcurrentHashMap;

public class HandlerUtil {

    private final static ConcurrentHashMap<Integer, DubboHandler> cacheHandler=new ConcurrentHashMap<>();

    public static void setCacheHandler(Integer type,DubboHandler handler){
        cacheHandler.put(type,handler);
    }

    public static DubboHandler getCacheHandler(Integer type){
        return cacheHandler.get(type);
    }
}
